import service from '../utils/axios.js'


const clientApi = {
	//债务列表
	debtListPost(params) {
		return service({
			url: 'debt/debtList',
			method: 'post',
			data: params,
		});
	},
	//合约详情
	debtInfoPost(params) {
		return service({
			url: 'debt/debtInfo',
			method: 'post',
			data: params,
		});
	},
	//获取债权人列表
	creditorListPost(params) {
		return service({
			url: 'debt/creditorList',
			method: 'post',
			data: params,
		});
	},
	//发起合约
	createDebtPost(params) {
		return service({
			url: 'debt/createDebt',
			method: 'post',
			data: params,
		});
	},
	//确认合约
	confirmDebtPost(params) {
		return service({
			url: 'debt/confirmDebt',
			method: 'post',
			data: params,
		});
	},
	//删除合约
	debtDelPost(params) {
		return service({
			url: 'debt/debtDel',
			method: 'post',
			data: params,
		});
	},
	//按期销账-查询当期还款数据
	cycleInfoPost(params) {
		return service({
			url: 'debt/cycleInfo',
			method: 'post',
			data: params,
		});
	},
	//按期销账
	cycleRepayPost(params) {
		return service({
			url: 'debt/cycleRepay',
			method: 'post',
			data: params,
		});
	},
	//待签署合约列表
	waitDebtPost(params) {
		return service({
			url: 'debt/waitDebt',
			method: 'post',
			data: params,
		});
	},
	
	//获取债务人列表
	obligorListPost(params) {
		return service({
			url: 'debt/obligorList',
			method: 'post',
			data: params,
		});
	},
	//自定义销账
	customRepayPost(params) {
		return service({
			url: 'debt/customRepay',
			method: 'post',
			data: params,
		});
	},
	//全部销账
	allRepayPost(params) {
		return service({
			url: 'debt/allRepay',
			method: 'post',
			data: params,
		});
	},
	//变更日期
	updatedSubmitPost(params) {
		return service({
			url: 'debt/updatedSubmit',
			method: 'post',
			data: params,
		});
	},
	// 验证交易密码 {pay_pwd: ''}
	confirmPayPassword(params) {
		return service({
			url: 'debt/confirmPayPassword',
			method: 'post',
			data: params,
		});
	}
}
export default clientApi
